static-delta: Pretend that world unreadable objects are new objects
authorMario Sanchez Prada <mario@endlessm.com>
Thu, 15 Dec 2016 19:40:18 +0000 (19:40 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 16 Dec 2016 14:52:09 +0000 (14:52 +0000)
commit722e143ee1109717064dc7ef06777f66a80116dd
treef62e320634601e7e3b4d4eb172f980864de2fcd4
parentc9d565a5a9b435b5d3ed64a96c14a1c110698f4c
static-delta: Pretend that world unreadable objects are new objects

This will prevent including in the delta the bits to update files that
are not world readable, so that we don't run into a permissions problem
when applying the deltas from a bare-user repository that has a bare
repository set as its parent.

This is the case for Endless when updating flatpak runtimes, as the
temporary directory created in ~/.local/share/flatpak/system-cache will
be of type bare-user with its parent set to /var/lib/flatpak which is a
bare repository in EOS, as it's shared with the one at /ostree/repo.

https://phabricator.endlessm.com/T14159

Closes: #634
Approved by: cgwalters
src/libostree/ostree-repo-static-delta-compilation.c